﻿/*
 * 文件名：Success.cs
 * 类名：XHCTMS.BLL.Success
 * 创建人：朱震宇
 * 创建时间：2013.5.29
 * 
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace XHCTMS.BLL
{
    public class Success
    {
        /// <summary>
        /// 查询所有学生成绩
        /// </summary>
        /// <returns>返回类型DataTable 异常/null</returns>
        public DataTable GetSuccess()
        {
            return new DAL.Success().GetSuccess();
        }

         /// <summary>
        /// 增加学生成绩
        /// </summary>
        /// <param name="studentId">学生编号</param>
        /// <param name="teachingId">课程编号</param>
        /// <returns>返回类型int 成功/1 失败/0 异常/-1</returns>
        public int Add(int studentId, int teachingId)
        {
            return new DAL.Success().Add(studentId, teachingId);
        }


        /// <summary>
        /// 获得某结课未打分课程的所有学生信息
        /// </summary>
        /// <param name="teaID">课程号</param>
        /// <returns>返回类型DataTable</returns>
        public DataTable GetTeachingEndStuInfo(int teaID)
        {
            return new DAL.Success().GetTeachingEndStuInfo(teaID);
        }

        /// <summary>
        /// 获取某结课未打分课程的所有班级信息
        /// </summary>
        /// <param name="teaID">课程号</param>
        /// <returns>返回类型DataTable</returns>
        public DataTable GetTeachingEndClassInfo(int teaID)
        {
            return new DAL.Success().GetTeachingEndClassInfo(teaID);
        }

        /// <summary>
        /// 批量处理 增加一个某班级某课程的所有学生成绩信息
        /// </summary>
        /// <param name="dicStuInfo"></param>
        /// <returns></returns>
        public int TeachingStuScore()
        {
            
            return -1;
        }


        /// <summary>
        /// 批量处理 增加一个某班级某课程的所有学生成绩信息
        /// </summary>
        /// <param name="lstSql"></param>
        /// <returns></returns>
        public int AddClassTeaStu(List<string> lstSql , int teaID)
        {
            return  new DAL.Success().AddClassTeaStu(lstSql,teaID);
        }

        /// <summary>
        /// 查找50项符合要求的学生信息（未毕业）
        /// </summary>
        /// <returns></returns>
        public DataTable Search(string[] parasValue, int page =1)
        { //classname classtea teaingtea subname   tealess  stuname
            return new DAL.Success().Search(parasValue, page);
        }


        /// <summary>
        /// 获取满足条件的所有学生成绩信息的页数（每页50条）
        /// </summary>
        /// <param name="parasValue"></param>
        /// <returns></returns>
        public int MaxPage(string[] parasValue)
        {
            return  new DAL.Success().MaxPage(parasValue);
        }
    }
}
